<template>
  <div class="cell">
    <div class="cell-label">{{ label }}</div>
    <div class="cell-input">
      <el-checkbox v-model="value" @change="input" true-label="0" false-label="1"><slot></slot></el-checkbox>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value: "0"
      }
    },
    props: {
      label: {
        type: String,
        default: 'label'
      },
      placeholder: {
        type: String | Number,
        default: '请输入'
      }

    },
    mounted() {
      this.$emit('input', this.value)
    },
    methods: {
      input() {
        this.$emit('input', this.value)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .cell{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 0 16px;
    .cell-label{
      width: 120px;
      margin-right: 12px;
      color: #646566;
      font-size: 15px;
    }
    .cell-input{
    }
  }
</style>
